home *** CD-ROM | disk | FTP | other *** search
- Documentation for bdf V1.02 (C) Richard K. Lloyd 1990
- ---------------------------
-
- ********************* Very boring Copyright Notice ********************
- * *
- * The source code and documentation for the bdf program are the *
- * exclusive copyright of Richard K. Lloyd and are freely distributable, *
- * provided this notice is left intact. *
- * *
- *************************************************************************
-
- Credits
- -------
-
- Michael Ben-Gershon (umace03@uk.ac.ic.doc) for supplying SCSIFS support
- and adding checks for the FS existence before attempting SWI calls to the FS.
-
- Machine/Configuration Requirements
- ----------------------------------
-
- Any Archimedes running RISC OS 2.00 or higher. Not tested with Arthur 1.20.
- Needs Minerva's MSDOS module to be present to work with MS-DOS disks.
- Now works with SCSI drives. Still doesn't with Econet (NetFS) drives...
-
- Introduction
- ------------
-
- UN*X has a nicely laid-out command (for a change !) called "bdf" which gives
- a summary of the sizes and usage of all mounted disks on the system. It's
- easily the best command to use when your system is in a filestore crisis.
- Note: "bdf" is the name used for System V UN*X, but BSD 4.X users may know it
- as "df" instead.
-
- Unfortunately, although the Archimedes has the *Free command, it only applies
- to ONE drive (defaults to the current one) on the CURRENT filing system
- (unless overridden by using *-fsname-Free) and only gives the tersest of
- information (bytes free and bytes used to be exact).
-
- I decided to group together all the information from all the filing systems
- I could cope with, add a few extra bits and lay the whole thing out as close
- to UN*X "bdf" as possible.
-
- The bdf command
- ---------------
-
- Syntax: *bdf [-f] [-s]
-
- Options: If none supplied, then drives are listed in the FS order specified
- in the routine PROCscansystems in the code. You are welcome to
- re-order the FSs to your personal preferences.
-
- If -f is specified, then drives are listed in descending free space
- order (VERY handy for shifting files about in a filestore crisis).
-
- If -s is specified, then drives are listed in descending size order.
-
- Historical note: UN*X bdf only has the -i qualifier (free nodes are
- displayed as well) and DOESN'T have the -f or -s
- qualifiers.
-
- Action:
-
- Scans ADFS, MSDOS, SCSIFS and RamFS drives for mounted disks and extracts
- the disk size, disk space free, disk space used, percentage used and disk
- title. Empty drives or drives containing unformatted disks will not be
- displayed. Numeric information is displayed in truncated kilobytes or
- percentages. Nothing is displayed until all drives are scanned (to allow
- for possible sorting) and if no valid mounted drives are found, then NOTHING
- (not even the heading) will be displayed.
-
- If more than one mounted drive was found, then bdf displays a grand total
- line as well, summing the figures obtained for all the drives.
-
- Known problems
- --------------
-
- * NetFS drives are currently not supported by this program because I simply
- don't know how to do it ! There's no equivalent to ADFS_FreeSpace etc. for
- NetFS. I personally consider this to be a gaping hole in the RISC OS Econet
- support and I hope it will be remedied in the next release. As far as I can
- tell, all the code to do it is embedded into the *NetFS:Free command !
-
- * Unformatted or MS-DOS disks in a drive slow down the scanning process
- considerably.
-
- Minerva's !PC-Access V1.46
- --------------------------
-
- Minerva are currently marketing an MS-DOS filing system and Filer under the
- name !PC-Access. This implements a SUBSET of ADFS filing system commands to
- allow MS-DOS disks to appear in a Desktop Filer window and their files to be
- dragged onto an ADFS Filer window to copy them. HOWEVER, there are some
- dodgy features of !PC-Access...
-
- 1) It doesn't translate/truncate names very well, especially when dragging
- from ADFS to MS-DOS. You always seem to get "MS-DOS name too long" errors,
- making it very awkward to use.
-
- 2) You can't seem to be able to use *Copy to copy between a non-current
- MS-DOS drive and an ADFS drive without using *-msdos-Mount first to
- signal a new current MS-DOS drive. This is because !PC-Acesss ignores
- the "msdos::1" syntax and always looks at the "current" MS-DOS drive
- for its filing operations. THIS IS ULTRA-NAFF.
-
- 3) *Cat on an empty MS-DOS disk generates an error (I suspect this is to
- do with a wildcard match facility but it is very bad programming) !
-
- 4) SWI "XMSOS_Drives" is poorly implemented, because the value for the floppy
- drives is returned in bits (e.g. %111 means 3 drives), whereas the value for
- the hard drives is returned as a normal number.
-
- 5) SWI "XMSDOS_FreeSpace" doesn't conform to the FileCore standard either -
- it takes the drive to be checked as a number rather than as a pointer to
- a null-terminated drive string.
-
- 6) SWI "XMSDOS_DescribeDisc" simply doesn't exist. This is a grave omission
- by Minerva and should be fixed as soon as possible.
-
- However, after all these problems, I've still decided to support this MSDOS
- module - it is a filing system after all. Until "XMSDOS_DescribeDisc" is
- supplied, I have to assume that the disk is 720K and I cannot display its
- volume title either. By the way, the MSDOS module seems to claim that
- 720K disks are actually 711K in size if you add up the used and free figures
- generated by *msdos:Free !
-
- Please Note:
-
- I don't work for Minerva and I certainly have nothing to do with the
- !PC-Access program. In fact, I wouldn't recommend buying it until the
- faults I mention above are fixed.
-
- Current differences between Archimedes bdf and UN*X bdf
- -------------------------------------------------------
-
- * Archimedes bdf reports the EXACT percentage used, rather than allowing
- for the 10% 'emergency space' that UN*X bdf allocates. Hence you can only
- reach 100% with Archimedes bdf, whereas you can reach 110% on UN*X bdf,
- which I consider to be utterly stupid...
-
- * Archimedes bdf uses different qualifiers compared to UN*X bdf. The latter
- has an esoteric qualifier "-i" which reports the number of inodes
- free (pretty meaningless to 99% of normal users) - this fails with
- NFS-mounted volumes anyway (reports -1 inodes free !).
-
- * UN*X bdf is known to 'hang' for long periods if an NFS-mounted volume is
- not available (usually because the system it is attached to has gone down).
- Since NetFS drives are not supported with V1.01 of Archimedes bdf, this
- isn't a problem (yet) ! However, unformatted or MS-DOS disks do cause a
- delay in the drive scanning.
-
- * UN*X bdf reports ALL partitions on the system, whether locally or remotely
- mounted. Archimedes bdf only knows about local disc drives and the RAM disc
- as of the current release.
-
- * UN*X bdf does not report the 'grand total' of disk space across all drives -
- it leaves you to get a pen and paper out and add the figures up !
-
- Revision History of the bdf command
- -----------------------------------
-
- Version 1.02 (September 1990)
- -----------------------------
-
- * If Minerva's MSDOS module is present (part of their !PC-Access program),
- then any MS-DOS floppies (not sure about hard disks) will be scanned.
- Due to unimplemented calls in the MSDOS module, I have to assume that
- the floppies are 720K in size and I can't find the volume title either.
-
- * Added an array to flag if a drive has already been scanned and found to
- contain a valid disk. This prevents two scans on drives (e.g. once for
- ADFS and again for MSDOS).
-
- * I now check for the existence of the FS SWI before attempting to use it.
- This bypasses any problems with partially implemented filing systems.
-
- Version 1.01 (August 1990)
- --------------------------
-
- * Received SCSIFS support code and FS existence checks from Michael
- Ben-Gershon. These were implemented, but the code was due for a drastic
- re-work anyway :-)
-
- * Stored information in a couple of arrays rather than immediately printing
- it out.
-
- * Able to implement sorting according to size or free space now - added two
- qualifiers (-s and -f) to cope with this.
-
- * Added a grand total line if more than one mounted drive was found.
-
- * Increased the field width from 7 to 9 characters for aesthetic reasons.
-
- Version 1.00 (July 1990)
- ------------------------
-
- * Written as a small BASIC program just so that I could get the calls right
- and develop the thing in a couple of hours or so. When the BASIC code
- stabilises, I'll tackle the whole thing and convert it into an RMA Utility
- program (ho hum, don't hold your breath for that - the percentage bits will
- mean I'll have to wheel out a 32-bit division algorithm in ARM code...).
-
- * Left NetFS support skeleton (utterly wrong though...) ready for some
- enterprising hacker to have a go. Don't forget to contact me and tell
- me about the changes though !
-
- Future improvements to bdf V1.02
- --------------------------------
-
- * Support NetFS drives. I'm leaving the field wide open here for anyone to
- have a stab at the code for this. I've had a go by 'cheating' - disassembling
- the NetFS module to see how it implements *Free...and it's a SWINE !
- I suspect that a wizard at Acorn (who are probably the only Econet users
- out there anyway - ouch, that was a low blow) might be able to come up with
- something.
-
- * Find a quicker way to "time-out" the ADFS scan when there's an MS-DOS disk
- (or, in fact, an unformatted disk) in the drive. Any ideas out out there ?
-
- Where to find me to report bugs or improvements to the bdf command
- ------------------------------------------------------------------
-
- Snail Mail JANET e-mail
- ---------- ------------
- Richard K. Lloyd, rkl@uk.ac.liv.cs.and
- 1, Banks Road,
- Lower Heswall,
- Wirral,
- Merseyside.
-